package com.taoban.shopdata.core;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.taoban.shopdata.entity.PriceUpdatedCommitResult;
import com.taoban.shopdata.utils.FactoryUtils;

public class ShopDataConsumerThread implements Runnable{
	public static final Log mLog = LogFactory.getLog(ShopDataConsumerThread.class);
    private PriceUpdatedCommitResult priceUpdatedCommitResult=null;
 
	public ShopDataConsumerThread(PriceUpdatedCommitResult priceUpdatedCommitResult) {
	super();
	this.priceUpdatedCommitResult=priceUpdatedCommitResult;
}




	public PriceUpdatedCommitResult getPriceUpdatedCommitResult() {
		return priceUpdatedCommitResult;
	}




	public void setPriceUpdatedCommitResult(
			PriceUpdatedCommitResult priceUpdatedCommitResult) {
		this.priceUpdatedCommitResult = priceUpdatedCommitResult;
	}




	public void run() {
		// TODO Auto-generated method stub
		    
		try{
			AbstractShopDataConsumer abstractShopDataConsumer=FactoryUtils.getShopDataConsumer(priceUpdatedCommitResult);
			abstractShopDataConsumer.process();
		}catch(Exception e){
			mLog.info("错误信息是:"+e.getMessage()+"");
		}
		


		
	}

}
